package day240520.p2;

public class WithGenerics <T> {
    private T object;

    public void setObject(T object) {
        this.object = object;
    }

    public T getObject() {
        return object;
    }

    public static void main(String[] args) {
        WithGenerics<String> withGeneric = new WithGenerics<String>();
        withGeneric.setObject("I am String");
        String s = withGeneric.getObject();
        System.out.println(s.length());
    }
}
